﻿@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<MovieDemo.ViewModels.MovieViewModel>
@{
    ViewBag.Title = "修改电影信息";
    Layout = "Views/_Layout.cshtml";
}

<form action="/movie/edit/@Model.MovieId" method="post">
    <div class="form-group">
        <label class="control-label col-md-2">电影名称</label>
        <div class="col-md-10">
            <input type="text" class="form-control" id="MovieName" name="MovieName" value="@Model.MovieName" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-md-2">电影类型</label>
        <div class="col-md-10">
            <select id="MovieTypeId" name="MovieTypeId" class="form-control">
                @foreach (var item in (System.Collections.Generic.List<MovieDemo.Models.MovieType>)ViewBag.typeList)
                {
                    if (Model.MovieTypeId == item.TypeId)
                    {
                        <option selected="selected" value="@item.TypeId">@item.TypeName</option>
                    }
                    else
                    {
                        <option value="@item.TypeId">@item.TypeName</option>
                    }
                }

            </select>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="修改" class="btn btn-default" />
        </div>
    </div>
</form>
